//notes from Will Zepeda
//handles the overall sprite management for background and buttons

#pragma once
#include <Windows.h>
#include "DirectX_includes.h"
#include "structure.h"


struct SpriteInfo
{
	IDirect3DTexture9* texture;
	D3DXIMAGE_INFO imageInfo;
	IDirect3DDevice9* pdevice;
	//image height and width from loaded file
	int height;
	int width;
	//setup for button coordinates
	XY center;							//local coordinate
	XY posOfCenter;						//screen coordinate
	float scale;						//within set scale
	float scaleButton;					//button use

	SpriteInfo();
	~SpriteInfo(){if(NULL != texture){texture->Release();}}
	
	void loadTexture(char *);			//read image from file

	void setCenter();
	void setPosOfCenter(float,float);	//for button placement
	void setScale(float,float);

	//check for if mouse click is within image
	bool inSprite(POINT);				//checks if its within the image boundry
	bool inSprite(XY);					//check if its within this coordinate on screen
};